export function createLogger(debug = false) {
    let _logger = {
        debug: debug
    };
    ["log","warn","error"].forEach(function(level) {
        _logger[level] = function() {
            if (this.debug) {
                return console[level].apply(console, Array.from(arguments));
            }
        }
    })
    return _logger;
}